﻿namespace EasyWeb.Web.UI
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Web.Mvc;

    public class EWHtmlHelper
    {
        public EWHtmlHelper(HtmlHelper helper)
        {
            EWGuard.IsNotNull(helper, "helper");

            this.HtmlHelper = helper;
        }

        public HtmlHelper HtmlHelper { get; protected set; }

        public HtmlHelper<TModel> CreateHtmlHelper<TModel>(TModel model)
        {
            return new HtmlHelper<TModel>(this.HtmlHelper.ViewContext, new EWViewDataContainer<TModel>() { Model = model });
        }
    }
}
